import request from '@/api/request';
import download from '@/api/download';
import { baseUrl } from '@/api/baseUrl';

export const getGoodsList = (params, cb) => {
  let url = `${baseUrl}/goodsList`;
  return request(url, params, cb, 'GET');
};

export const downloadTemplate = (params, fileName, cb) => {
  let url = `${baseUrl}/downloadExcel`;
  return download(url, params, cb, 'POST', { responseType: 'blob' }, fileName);
};
